package com.ctshk.rpc.order.goods.entity;

import com.ctshk.common.constant.ElasticSearchConstant;
import com.ctshk.rpc.goods.dto.htmlFive.*;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDateTime;
import java.util.List;

/**
 * TODO
 *
 * @author 黄利斌
 * @date 2021/5/20 6:20 下午
 */
@Data
@ApiModel(value = "CommodityInfoListDTO对象", description = "商品分页列表")
@Document(indexName = ElasticSearchConstant.GOODS_INDEX)
public class CommodityInfoListDTO implements Serializable {
    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "商品id")
    private Long id;

    @ApiModelProperty(value = "商品销售量")
    private Long sales;

    @ApiModelProperty(value = "商品分类id")
    private Long commodityClassificationId;

    @ApiModelProperty(value = "商品分类名称")
    private String commodityClassificationName;

    @ApiModelProperty(value = "商品名称")
    private String commodityName;

    @ApiModelProperty(value = "供应商ID")
    private Long supplierId;

    @ApiModelProperty(value = "供应商名称")
    private String supplierName;

    @ApiModelProperty(value = "负责人ID")
    private Long chargePersonId;

    @ApiModelProperty(value = "负责人姓名")
    private String chargePersonName;

    @ApiModelProperty(value = "商品品牌id")
    private Long commodityBrandId;

    @ApiModelProperty(value = "商品品牌名称")
    private String commodityBrandName;

    @ApiModelProperty(value = "商品介绍")
    private String commodityIntroduce;

    @ApiModelProperty(value = "计量id")
    private Long unitOfMeasurementId;

    @ApiModelProperty(value = "计量名称")
    private String unitOfMeasurementName;

    @ApiModelProperty(value = "排序")
    private Integer sort;

    @ApiModelProperty(value = "打包状态:1：允许打包;2：不允许打包;3：只限打包")
    private Integer packStatus;

    @ApiModelProperty(value = "运费模板id")
    private Long freightTemplateId;

    @ApiModelProperty(value = "模板名称")
    private String templateName;

    @ApiModelProperty(value = "是否允许门店自提：0：否；1：是")
    private Integer isItSelfProvided;

    @ApiModelProperty(value = "售后服务：	1：可退可换（不勾选默认为2）；2：不退不换")
    private Integer afterSaleService;

    @ApiModelProperty(value = "退改手续费类型")
    private Integer refundServiceChargeType;

    @ApiModelProperty(value = "退改手续费")
    private BigDecimal refundServiceCharge;

    @ApiModelProperty(value = "注意事项")
    private String mattersNeedingAttention;

    @ApiModelProperty(value = "商品详情")
    private String commodityDetails;

    @ApiModelProperty(value = "商品编码")
    private String commodityNumber;

    @ApiModelProperty(value = "售卖状态：	1：上架；2：下架")
    private Integer saleStatus;

    @ApiModelProperty(value = "审批状态：1：待提交；2：审批中；3：审批通过；4：审批未通过")
    private Integer approvalStatus;

    @ApiModelProperty(value = "审批id")
    private Long approvalId;

    @ApiModelProperty(value = "创建人")
    private Long createId;

    @ApiModelProperty(value = "创建时间")
    private LocalDateTime gmtCreate;

    @ApiModelProperty(value = "修改人")
    private Long modifiedId;

    @ApiModelProperty(value = "修改时间")
    private LocalDateTime gmtModified;

    @ApiModelProperty(value = "删除标识")
    private Integer isDeleted;

    @ApiModelProperty(value = "商品销售区域")
    private CommoditySalesAreaDTO commoditySalesArea;

    @ApiModelProperty(value = "商品属性表")
    private CommodityAttributeDTO commodityAttribute;

    @ApiModelProperty(value = "商品文件表")
    // 数据类型为嵌入
    @Field(type = FieldType.Nested)
    private List<CommodityFileDTO> commodityFiles;

    @ApiModelProperty(value = "商品关键词")
    // 数据类型为嵌入
    @Field(type = FieldType.Nested)
    private List<CommodityKeyWordDTO> commodityKeyWords;

    @ApiModelProperty(value = "商品标签")
    // 数据类型为嵌入
    @Field(type = FieldType.Nested)
    private List<CommodityLabelDTO> commodityLabels;

    @ApiModelProperty(value = "商品推荐表")
    // 数据类型为嵌入
    @Field(type = FieldType.Nested)
    private List<CommodityRecommendDTO> commodityRecommends;

    @ApiModelProperty(value = "商品成本 OR 商品成本属性 一个商品二者只会存在其一")
    // 数据类型为嵌入
    @Field(type = FieldType.Nested)
    private List<CommodityCostDTO> commodityCosts;

    @ApiModelProperty(value = "商品成本属性 OR 商品成本 一个商品二者只会存在其一")
    // 数据类型为嵌入
    @Field(type = FieldType.Nested)
    private List<CommodityCostAttributeDTO> commodityCostAttributes;
}
